FROM anapsix/alpine-java:8_server-jre_unlimited

#RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

RUN mkdir -p /application

WORKDIR /application

EXPOSE ${PORT:-7000}

ADD ./target/application.jar ./application.jar

CMD java -Dfile.encoding=utf-8 \ 
    -Djava.security.egd=file:/dev/./urandom \
    -Dserver.port=${SERVER_PORT:-7000} \  
    -jar -Xms128m -Xmx1024m application.jar